Port BUSACCESS - CAN¶
Access to CAN
Stimulation¶
激励总线信号的前提是启用包含待激励信号所在信号组的 循环写入。
Specifics¶
This port type allows you to read and manipulate the bus quantities (frames and signals) provided by the FMU in accordance with the Layered Standard for Network Communication.
Detailed configuration instructions can be found in the section Layered Standard for Network Communication (FMI-LS-BUS).
Properties 🛈¶
Name |
在以下情况下可用 |
默认值 |
有效值 |
Type |
Description |
|---|---|---|---|---|---|
Bus terminal name |
string |
Name of the bus terminal to be assigned to this port (as defined in terminalsAndIcons.xml). |
|||
Bit rate |
‘500KB’ |
[‘10KB’, ‘20KB’, ‘50KB’, ‘83.333KB’, ‘100KB’, ‘125KB’, ‘250KB’, ‘500KB’, ‘666.667KB’, ‘800KB’, ‘1000KB’] |
string |
Bit rate |
|
Trace 格式 |
ASC |
[ASC, MDF4, PCAPNG] |
string |
总线 Recording 的默认文件格式。总线的 PCAPNG 不受 Trace Analysis 支持 |
|
Bus-DB |
string |
Jobs 🛈¶
ClearFrame¶
清除指定帧的接收缓冲区
Parameterization
Parameter
Name |
在以下情况下可用 |
默认值 |
有效值 |
Type |
Description |
|---|---|---|---|---|---|
FrameId |
int |
Frame ID |
|||
isExtended |
None |
[False, True] |
bool |
地址格式:True 表示 29 位,False 表示 11 位,None 使用测试台架配置中的“Mode”设置 |
返回值
Name |
在以下情况下可用 |
默认值 |
有效值 |
Type |
Description |
|---|---|---|---|---|---|
result |
ByteStream |
ByteStream |
CloseIsoTpSession¶
关闭 ISO TP 会话。
Parameterization
返回值
Name |
在以下情况下可用 |
默认值 |
有效值 |
Type |
Description |
|---|---|---|---|---|---|
Return |
[False, True] |
bool |
会话已成功关闭 |
DeregisterFrameForInbox¶
注销一个流式传输到收件箱的帧
Parameterization
Parameter
Name |
在以下情况下可用 |
默认值 |
有效值 |
Type |
Description |
|---|---|---|---|---|---|
FrameId |
int |
Frame ID |
|||
Inbox |
object |
现有收件箱 |
|||
isExtended |
None |
[False, True] |
bool |
地址格式:True 表示 29 位,False 表示 11 位,None 使用测试台架配置中的“Mode”设置 |
DeregisterStreamForInbox¶
注销一个 ISO TP 会话。
Parameterization
Parameter
Name |
在以下情况下可用 |
默认值 |
有效值 |
Type |
Description |
|---|---|---|---|---|---|
conId |
int |
Connection ID |
DisableSendFrameCyclic¶
停用对具有指定 ID 的报文的周期发送
Parameterization
Parameter
Name |
在以下情况下可用 |
默认值 |
有效值 |
Type |
Description |
|---|---|---|---|---|---|
FrameId |
int |
Frame ID |
|||
isExtended |
None |
[False, True] |
bool |
地址格式:True 表示 29 位,False 表示 11 位,None 使用测试台架配置中的“Mode”设置 |
GetFirstValue¶
返回自 test case 启动以来收到的信号的第一个值。
Parameterization
Parameter
Name |
在以下情况下可用 |
默认值 |
有效值 |
Type |
Description |
|---|---|---|---|---|---|
FrameName |
string |
Frame name |
|||
NodeName |
string |
电子控制单元的名称 |
|||
RawValue |
False |
[False, True] |
bool |
如果为 ‘True’,则返回原始值。 |
|
Reset |
False |
[False, True] |
bool |
若为 ‘True’,则第一个接收到的值在被读取后将被删除 |
|
SignalName |
string |
信号名称 |
GetLastReceptionTimestamp¶
获取最后一次接收的时间戳(以秒为单位)
InitFrame¶
注册报文 ID 以供后续使用,例如 ReadFrame
Parameterization
Parameter
Name |
在以下情况下可用 |
默认值 |
有效值 |
Type |
Description |
|---|---|---|---|---|---|
FrameId |
int |
Frame ID |
|||
isExtended |
None |
[False, True] |
bool |
地址格式:True 表示 29 位,False 表示 11 位,None 使用测试台架配置中的“Mode”设置 |
OpenIsoTpSession¶
打开一个 ISO TP 会话。
Parameterization
Parameter
Name |
在以下情况下可用 |
默认值 |
有效值 |
Type |
Description |
|---|---|---|---|---|---|
addressByte |
ByteStream |
网络目标地址或地址扩展(仅与扩展寻址或混合寻址相关) - 长度为 1 的 ByteStream |
|||
addressMode |
0 |
int |
寻址模式代码 - 整数(0:标准寻址 | 1:扩展寻址) |
||
blockSize |
0 |
int |
可连续接收而无需中间流控的帧数(0 - 255) - Integer |
||
fillByte |
ByteStream |
用于填充报文的字节(可选) - 长度为 1 的 ByteStream |
|||
flowControlAddressByte |
ByteStream |
FlowControl 使用不同的网络目标地址或地址扩展(仅与扩展寻址和混合寻址相关)- 长度为 1 的 ByteStream |
|||
flowControlId |
int |
流控消息的消息 ID(可选)- 十六进制(可选整数) |
|||
isExtended |
-1 |
int |
是否使用扩展 CAN-ID 格式?(1=是 / 29 位;0=否 / 11 位;-1 = 使用 TBC 中的设置) |
||
maxFrameLength |
0 |
int |
一帧的最大长度(字节,适用于首帧、连续帧和末帧);如果该值设为 0,则使用 ISO 10681-2 中描述的最大值 - Integer |
||
requestId |
int |
ECU 请求的报文 ID - 十六进制(可选,整数) |
|||
responseId |
int |
ECU 响应的消息 ID - 十六进制(可选 Integer) |
|||
separationTime |
0 |
int |
连续片段之间的最小时间间隔 0x00..0x7F => 0..127ms,0x80..0xf0 => 保留,0xf1..0xf9 => 100.900µs,0xfa..0xff => 保留 - 整数 |
返回值
Name |
在以下情况下可用 |
默认值 |
有效值 |
Type |
Description |
|---|---|---|---|---|---|
Return |
int |
Connection ID |
ReadFrame¶
读取指定的帧 ID(此前请先使用 InitFrame!)
Parameterization
Parameter
Name |
在以下情况下可用 |
默认值 |
有效值 |
Type |
Description |
|---|---|---|---|---|---|
doDelete |
False |
[False, True] |
bool |
若为 “True”,则在读取后删除该帧 |
|
FrameId |
int |
Frame ID |
|||
isExtended |
None |
[False, True] |
bool |
地址格式:True 表示 29 位,False 表示 11 位,None 使用测试台架配置中的“Mode”设置 |
返回值
Name |
在以下情况下可用 |
默认值 |
有效值 |
Type |
Description |
|---|---|---|---|---|---|
result |
ByteStream |
ByteStream |
ReadFrameEx¶
读取指定的帧 ID(此前请先使用 InitFrame!)
Parameterization
Parameter
Name |
在以下情况下可用 |
默认值 |
有效值 |
Type |
Description |
|---|---|---|---|---|---|
doDelete |
False |
[False, True] |
bool |
若为 “True”,则在读取后删除该帧 |
|
FrameId |
int |
Frame ID |
|||
isExtended |
None |
[False, True] |
bool |
地址格式:True 表示 29 位,False 表示 11 位,None 使用测试台架配置中的“Mode”设置 |
返回值
Name |
在以下情况下可用 |
默认值 |
有效值 |
Type |
Description |
|---|---|---|---|---|---|
result |
object |
CanFrame |
RegisterFrameForInbox¶
注册一个帧,以便将其流式传输到 Inbox。
Parameterization
Parameter
Name |
在以下情况下可用 |
默认值 |
有效值 |
Type |
Description |
|---|---|---|---|---|---|
FrameId |
int |
Frame ID |
|||
Inbox |
object |
现有收件箱 |
|||
isExtended |
None |
[False, True] |
bool |
地址格式:True 表示 29 位,False 表示 11 位,None 使用测试台架配置中的“Mode”设置 |
|
saveAsCanFrame |
False |
[False, True] |
bool |
如果为 True,则该帧保存为 CanFrame 对象,否则保存为 ByteStream |
RegisterStreamForInbox¶
注册一个 ISO TP 会话,以便将其流式传输到 Inbox。
Parameterization
Parameter
Name |
在以下情况下可用 |
默认值 |
有效值 |
Type |
Description |
|---|---|---|---|---|---|
conId |
int |
Connection ID |
|||
inbox |
object |
现有收件箱 |
ResetFirstValue¶
清除给定信号的第一个已接收值
Parameterization
Parameter
Name |
在以下情况下可用 |
默认值 |
有效值 |
Type |
Description |
|---|---|---|---|---|---|
FrameName |
string |
Frame name |
|||
NodeName |
string |
电子控制单元的名称 |
|||
SignalName |
string |
信号名称 |
SendFrame¶
使用给定 ID 和数据发送消息。报文 ID 必须事先通过 job “InitFrame” 注册。
Parameterization
Parameter
Name |
在以下情况下可用 |
默认值 |
有效值 |
Type |
Description |
|---|---|---|---|---|---|
DataByteStream |
ByteStream |
要发送的数据 |
|||
FrameId |
int |
Frame ID |
|||
isExtended |
None |
[False, True] |
bool |
地址格式:True 表示 29 位,False 表示 11 位,None 使用测试台架配置中的“Mode”设置 |
SendFrameCyclic¶
以给定的 ID 和数据循环发送报文。报文 ID 必须事先通过作业 “InitFrame” 注册。
Parameterization
Parameter
Name |
在以下情况下可用 |
默认值 |
有效值 |
Type |
Description |
|---|---|---|---|---|---|
Count |
int |
发送重复次数 |
|||
DataByteStream |
ByteStream |
要发送的数据 |
|||
FrameId |
int |
Frame ID |
|||
Interval |
int |
循环时间,单位为 ms |
|||
isExtended |
None |
[False, True] |
bool |
地址格式:True 表示 29 位,False 表示 11 位,None 使用测试台架配置中的“Mode”设置 |
SendStream¶
通过 ISO-TP 发送数据流。
Parameterization
Parameter
Name |
在以下情况下可用 |
默认值 |
有效值 |
Type |
Description |
|---|---|---|---|---|---|
conId |
int |
Connection ID |
|||
data |
object |
要通过 ISO-TP 发送的负载 |
|||
timeout |
int |
发送消息的超时时间,单位毫秒 |
SetFlowControlCTS¶
激活后,将始终发送流控制“ContinueToSend”消息来响应分段请求。此外,还可以为内部参数 BlockSize 和 SeparationTime 赋予新值。
Parameterization
Parameter
Name |
在以下情况下可用 |
默认值 |
有效值 |
Type |
Description |
|---|---|---|---|---|---|
BlockSize |
int |
可连续接收而无需中间流控的帧数(0 - 255) - Integer 如果为 None,则保留来自测试配置、OpenDiagSession 作业或上一次 SetFlowControlCTS 调用的最新设置。 |
|||
SeparationTime |
int |
连续片段之间的最小时间间隔 0x00..0x7F => 0..127ms,0x80..0xf0 => 保留,0xf1..0xf9 => 100.900µs,0xfa..0xff => 保留 - 整数 如果为 None,则保留来自测试配置、OpenDiagSession 作业或上一次 SetFlowControlCTS 调用的最新设置。 |
|||
SessionId |
object |
诊断会话的句柄。这可以是 TCF 中指定的 SUT 名称、由 OpenDiagSession job 返回的句柄,或 None(仅当只指定了一个 SUT 时可用)。 |
SetFlowControlWait¶
激活后,对分段请求始终发送流控 “Wait” 消息。注意:激活期间无法接收任何分段消息。使用 Job SetFlowControlCTS 重置此行为。
Parameterization
Parameter
Name |
在以下情况下可用 |
默认值 |
有效值 |
Type |
Description |
|---|---|---|---|---|---|
SessionId |
object |
诊断会话的句柄。这可以是 TCF 中指定的 SUT 名称、由 OpenDiagSession job 返回的句柄,或 None(仅当只指定了一个 SUT 时可用)。 |
|||
WaitTimeInterval |
0 |
int |
等待时间间隔,单位为 ms。如果设为 0,则只发送一次流控制“Wait”消息以响应分段请求。如果设为大于 0 的值,则按给定间隔周期性发送流控制“Wait”消息。 |
StartPlayback¶
开始回放 Recording
Parameterization
Parameter
Name |
在以下情况下可用 |
默认值 |
有效值 |
Type |
Description |
|---|---|---|---|---|---|
AscFile |
uri |
ASC file |
返回值
Name |
在以下情况下可用 |
默认值 |
有效值 |
Type |
Description |
|---|---|---|---|---|---|
handle |
int |
可用于停止回放的句柄 |
StopPlayback¶
停止正在运行的回放
Parameterization
Parameter
Name |
在以下情况下可用 |
默认值 |
有效值 |
Type |
Description |
|---|---|---|---|---|---|
handle |
int |
从 StartPlayback 获得的句柄 |